//
//  ExamineDetailsFooterView.m
//  YuTang
//
//  Created by 葛悦彣 on 2024/8/23.
//

#import "ExamineDetailsFooterView.h"

@interface ExamineDetailsFooterView ()
@property (nonatomic ,strong) UIView * noDataView;
@property (nonatomic ,strong) UILabel * processUserName;
@property (nonatomic ,strong) UILabel * processTime;
@property (nonatomic ,strong) UILabel * processTitle;
@property (nonatomic ,strong) UILabel * reason;
@property (nonatomic ,strong) UILabel * titlelab;
@property (nonatomic ,strong) UILabel * nadatelab;
@end

@implementation ExamineDetailsFooterView

+ (instancetype)NewView{
    ExamineDetailsFooterView * view = [ExamineDetailsFooterView new];
    view.clipsToBounds = YES;
    [view setupview];
    return view;
}
- (void)setupview{
    UIView * backview = [UIView new];
    backview.backgroundColor = UIColor.whiteColor;
    [self addSubview:backview];
    [DTKTool YJ:kwt(5) andView:backview];
    [backview mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.offset(kwt(8));
        make.bottom.right.offset(kwt(-8));
    }];
    
    UILabel * templab = [DTKTool labelWithText:@"接收记录" andFont:kCFont(19) andTextColor:KcolorHex(@"#222222")];
    self.titlelab = templab;
    [backview addSubview:templab];
    [templab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(kwt(15));
        make.left.offset(kwt(12));
    }];
  
    UIImageView * temp1= kimageView(@"complete");
    [DTKTool YJBK:kwt(9) andView:temp1 andWidth:1.5 andColor:KcolorHex(@"#90B5FA")];
    [backview addSubview:temp1];
    [temp1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(kwt(52));
        make.left.offset(kwt(10));
        make.width.height.offset(kwt(18));
    }];
    
    UIView * line = [UIView new];
    line.backgroundColor = KcolorHex(@"#BED1F4");
    [backview addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(temp1);
        make.top.equalTo(temp1.mas_bottom);;
        make.bottom.offset(kwt(-15));
        make.width.offset(1);
    }];
    
    UILabel * processUserName = [DTKTool labelWithText:@"-" andFont:kCFont(17) andTextColor:KcolorHex(@"#222222")];
    self.processUserName = processUserName;
    [backview addSubview:processUserName];
    [processUserName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(temp1);
        make.left.offset(kwt(35));
    }];
    
    
    UILabel * processTime = [DTKTool labelWithText:@"-" andFont:kFont(15) andTextColor:KcolorHex(@"#787A79")];
    self.processTime = processTime;
    [backview addSubview:processTime];
    [processTime mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(temp1);
        make.right.offset(kwt(-10));
    }];
    
    UIView * btview = [UIView new];
    btview.backgroundColor = KcolorHex(@"#F6F7F9");
    [DTKTool YJ:kwt(5) andView:btview];
    [backview addSubview:btview];
    [btview mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(kwt(78));
        make.left.offset(kwt(35));
        make.right.offset(kwt(-10));
        make.bottom.offset(kwt(-15));
    }];
    
    UILabel * processTitle = [DTKTool labelWithText:@"-" andFont:kCFont(15) andTextColor:KcolorHex(@"#2C72F7")];
    self.processTitle = processTitle;
    [btview addSubview:processTitle];
    [processTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.offset(kwt(15));
        make.top.offset(kwt(12));
        make.left.offset(kwt(8));
    }];
    
    UILabel * reason = [DTKTool labelWithText:@"-" andFont:kFont(15) andTextColor:KcolorHex(@"#222222")];
    self.reason = reason;
    reason.numberOfLines = 0;
    [btview addSubview:reason];
    [reason mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(kwt(38));
        make.width.offset(kwt(290));
        make.left.offset(kwt(8));
    }];
    
    UIView * noDataView = [UIView new];
    noDataView.backgroundColor = UIColor.whiteColor;
    noDataView.clipsToBounds = YES;
    self.noDataView = noDataView;
    [backview addSubview:noDataView];
    [noDataView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(kwt(50));
        make.left.right.bottom.offset(0);
    }];
    
    UIImageView * img = kimageView(@"no_data");
    [noDataView addSubview:img];
    [img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(kwt(12));
        make.centerX.offset(0);
        make.width.height.offset(kwt(140));
    }];
    
    UILabel * lab = [DTKTool labelWithText:@"暂无接收记录" andFont:kFont(16) andTextColor:KcolorHex(@"#686868")];
    self.nadatelab = lab;
    [noDataView addSubview:lab];
    [lab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(kwt(168));
        make.centerX.offset(0);
    }];
    
    
    
    
}
- (void)isSH{
    self.titlelab.text = @"审核记录";
    self.nadatelab.text = @"暂无审核记录";
}
- (void)setHandoverProcessModel:(handoverProcessModel *)handoverProcessModel{
    _handoverProcessModel = handoverProcessModel;
    self.noDataView.hidden = handoverProcessModel;
    self.processTime.text = handoverProcessModel.processTime;
    self.processTitle.text = handoverProcessModel.processTitle;
    self.processUserName.text = handoverProcessModel.processUserName;
    self.reason.text = [NSString stringWithFormat:@"拒绝原因:%@",handoverProcessModel.reason];
}
@end
